Skip to content

Conversation

@jmoseley
Copy link
Contributor

Update the event schemas to match the latest version.

@jmoseley jmoseley requested a review from a team as a code owner January 26, 2026 18:43
Copilot AI review requested due to automatic review settings January 26, 2026 18:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the generated event schemas across multiple languages (Python, TypeScript, Go, C#) to match the latest version of the session-events.schema.json. The changes add support for new event types, additional fields for tool execution tracking, selection-based attachments, and enhanced result information.

Changes:

  • Added SessionSnapshotRewind event type for tracking session state rewinds
  • Enhanced Attachment type with selection support (file path, text, and position information)
  • Added MCP (Model Context Protocol) server and tool name tracking fields
  • Added detailedContent field to Result type for richer tool execution results

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/snapshots/session/should_abort_a_session.yaml Updated test snapshot with modified prompts, added assistant messages, and adjusted initial_wait parameter
python/copilot/generated/session_events.py Added Selection/Start/End classes, enhanced Attachment class, added new Data fields (events_removed, up_to_event_id, mcp_server_name, mcp_tool_name), updated Result with detailed_content, added SessionSnapshotRewind event type
nodejs/src/generated/session-events.ts Added SessionSnapshotRewind event type, implemented discriminated union for attachments with selection support, added MCP fields and detailedContent
go/generated_session_events.go Added new Data struct fields, enhanced Attachment with selection support, added SelectionClass/End/Start structs, updated Result with DetailedContent, added enum values
dotnet/src/Generated/SessionEvents.cs Added SessionSnapshotRewindEvent class and data, implemented polymorphic attachment classes with File/Directory/Selection variants, added MCP fields to tool execution, updated Result with DetailedContent
nodejs/scripts/generate-csharp-session-types.ts Added polymorphic class generation functions (findDiscriminator, generatePolymorphicClasses, generateDerivedClass) to support discriminated unions in C#
Comments suppressed due to low confidence (1)

nodejs/scripts/generate-csharp-session-types.ts:414

  • For loop variable variant is not used in the loop body.
    for (const [constValue, variant] of discriminatorInfo.mapping) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

✅ Cross-SDK Consistency Review

I've reviewed this PR for consistency across all four SDK implementations (Node.js/TypeScript, Python, Go, and .NET). All generated event schemas have been updated consistently.

Changes Verified

This PR adds four new features to the session event schemas, and all have been implemented consistently across all SDKs:

  1. New SessionSnapshotRewind Event - Allows tracking session state rewinding with upToEventId and eventsRemoved fields
  2. MCP Tool Metadata - Adds mcpServerName and mcpToolName to tool execution events for Model Context Protocol integration
  3. Selection Attachment Type - Extends attachments to support code selections (in addition to files and directories) with position tracking
  4. Detailed Tool Content - Adds optional detailedContent field to tool execution results

Naming Convention Compliance

All naming follows the appropriate language conventions:

  • TypeScript: camelCase (mcpServerName, upToEventId)
  • Python: snake_case (mcp_server_name, up_to_event_id)
  • Go: PascalCase for exported (MCPServerName, UpToEventID)
  • .NET: PascalCase (McpServerName, UpToEventId)

Verdict

No consistency issues found. This PR maintains excellent cross-SDK consistency, with all four implementations receiving equivalent schema updates generated from the same source schema.

AI generated by SDK Consistency Review Agent

@jmoseley jmoseley added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit f902b76 Jan 26, 2026
27 checks passed
@jmoseley jmoseley deleted the jm/generate branch January 26, 2026 21:23
@stomde
Copy link

stomde commented Jan 26, 2026

Gees😞😞😞😴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants